<template>
  <div class="approved">
    <MyHeader />
    <div class="approved_main">
      <div>
        <div class="approved_main-title">审批意见</div>
        <div class="approved_main-content">
          <p>审批机关：
            <span>{{approve.regorg | dict('CA11')}}</span>
          </p>
          <p>审批状态：
            <span>{{approve.state | dict('DFCP09')}}</span>
          </p>
          <p>审批意见：
            <span>{{approve.apprmsg}}</span>
          </p>
        </div>
        <div class="approved_main-pic">
          <img src="../../assets/img/spyj.png" alt="">
        </div>
      </div>
    </div>
    <div class="approved_confirm">
      <Button type="primary" @click="fanhui">确定</Button>
    </div>
    <div class="approved_bottom">
      <MyFooter />
    </div>
  </div>
</template>

<script>
  import MyHeader from '../../components/MyHeader.vue'
  import request from '../../utils/request'
  import MyFooter from '../../components/MyFooter.vue'
  export default {
    data() {
      return {
        approve: {}
      }
    },
    methods: {
      queryInit() {
        request.get('/interface/business/detail.do', {gid: sessionStorage.getItem('gid')})
        .then(response => {
          if (response.data.result === 'error') {
            this.$ErrorAlert(response.data.message)
            return null
          }
          // 成功逻辑
          this.approve = response.data.data.business
        })
      },
      fanhui() {
        this.$router.go(-1)
      }
    },
    mounted() {
      this.queryInit()
    },
    components: {
      MyFooter,
      MyHeader
    }
  }

</script>

<style lang="scss" scoped>
  .approved {
    position: relative;
    min-height: 100%;
    padding-bottom: 2.25rem;
    &_main {
      padding: 0.72rem;
      >div {
        &:first-child {
          padding: 0.18rem 0.54rem 0;
          border: 1px solid #ccc;
        }
      }
      &-title {
        font-size: 0.64rem;
        font-weight: 700;
        text-align: center;
        height: 1.75rem;
        line-height: 1.75rem;
        border-bottom: 1px solid #ccc;
      }
      &-content {
        padding: 0.72rem 0 3.57rem;
        font-size: 0.5rem;
        p {
          &:nth-child(2) {
            span {
              color: #f6787b;
            }
          }
        }
      }
      &-pic {
        text-align: center;
        img {
          width: 7.14rem;
          vertical-align: bottom;
        }
      }
    }
    &_confirm {
      margin-top: 1.75rem;
      text-align: center;
      button {
        font-size: 0.57rem;
        padding: 0.28rem 1.44rem;
      }
    }
    &_bottom {
      position: absolute;
      bottom: 0;
      width: 100%;
    }
  }

</style>
